package edu.cmu.cs.stage3.alice.authoringtool.util;

import edu.cmu.cs.stage3.util.StringObjectPair;

/**
 * @author Jason Pratt
 */
public class ResponsePrototype extends ElementPrototype {
	public ResponsePrototype( Class responseClass, StringObjectPair[] knownPropertyValues, String[] desiredProperties ) {
		super( responseClass, knownPropertyValues, desiredProperties );
	}

	public edu.cmu.cs.stage3.alice.core.Response createNewResponse() {
		return (edu.cmu.cs.stage3.alice.core.Response)createNewElement();
	}

	public Class getResponseClass() {
		return super.getElementClass();
	}

	// a rather inelegant solution for creating copies of the correct type.
	// subclasses should override this method and call their own constructor
	//Rem @Override
	protected ElementPrototype createInstance( Class elementClass, StringObjectPair[] knownPropertyValues, String[] desiredProperties ) {
		return new ResponsePrototype( elementClass, knownPropertyValues, desiredProperties );
	}
}

